package com.itheima.manager;

import com.itheima.domain.CmsSubject;
import com.itheima.service.db.CmsSubjectService;
import com.itheima.util.R;
import com.itheima.vo.PageBeanVo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CmsSubjectManager {
    @DubboReference
    CmsSubjectService cmsSubjectService;



    public List<CmsSubject> findAllSubject() {
        return cmsSubjectService.findAllSubject();
    }

    public R findSubjectList(String keyword, Integer pageNum, Integer pageSize) {
        PageBeanVo pageBeanVo = cmsSubjectService.findSubjectList(keyword, pageNum, pageSize);
        return R.success(pageBeanVo);
    }
}
